<?php $fb_params = MKT_Util::getConfig("facebook"); ?>
<?php $appId = $fb_params['params']['appId']; ?>
<script>
    var appId = '<?php echo $appId ?>';
    var base_url = '<?php echo $this->baseUrl() ?>';
</script>
<script src="//connect.facebook.net/en_US/all.js"></script>
<script>
    FB.init({
        appId: appId, 
        channelUrl: '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File for x-domain communication
        status: true, 
        cookie: true, 
        xfbml: true
    });
    FB.Canvas.setAutoGrow();
</script>